//
// Created by zhangrongxiang on 2017/9/26 12:41
//

/* system example : DIR */
#include <stdio.h>      /* printf */
#include <stdlib.h>     /* system, NULL, EXIT_FAILURE */

int main() {
    int i;
    printf("Checking if processor is available...");
    if (system(NULL)) puts("Ok");
    else exit(EXIT_FAILURE);
    printf("Executing command DIR...\n");
    i = system("dir");
    i = system("gcc system.c");
    printf("The value returned was: %d.\n", i);
    return 0;
}